/*
 *  WilBase64Stream.cpp
 *  Wilson
 *
 *  Created by Sebastian Orfino on 8/23/11.
 *  Copyright 2011 __MyCompanyName__. All rights reserved.
 *
 */
#include "VCPlugInHeaders.h"			    

// Interface includes:
// none.

// Implementation Includes
#include "CStreamWrite.h" 


// Project includes:
#include "WilID.h"
#include "WilBase64XferBytes.h"

class WilBase64Stream : public CStreamWrite {

	
	WideString buffer_;
	WilBase64XferBytes wilBase64XferBytes;

	
public:
	
	WilBase64Stream(IPMUnknown*ipu):CStreamWrite(ipu) {
	
		this->SetXferBytes(&wilBase64XferBytes);
	}
	virtual ~WilBase64Stream() { }
		
	/** Te devuelve el contenido del stream en base64 */
	WideString GetBuffer() const {
		return WideString(wilBase64XferBytes.GetBuffer().c_str());
	}
	
};


CREATE_PMINTERFACE(WilBase64Stream, kWilBase64StreamImpl)

